<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src="<%=request.getContextPath() %>/resources/js/jquery-1.7.2.min.js"></script>
<script src="http://echarts.baidu.com/build/dist/echarts.js"></script>
<title>index</title>
<script type="text/javascript">
	//路径配置
	require.config({
	    paths: {
	        echarts: 'http://echarts.baidu.com/build/dist'
	    }
	});

	// 使用
	require(
	    [
	        'echarts',
	        'echarts/chart/bar' // 使用柱状图就加载bar模块，按需加载
	    ],
	    function (ec) {
	        // 基于准备好的dom，初始化echarts图表
	        var myChart = ec.init(document.getElementById('main')); 
	        var option = {
	            tooltip: {
	                show: true
	            },
	            legend: {
	                data:['话题']
	            },
	            xAxis : [
	                {
	                    type : 'category',
	                    data : ["Person","Location","Organization"]
	                }
	            ],
	            yAxis : [
	                {
	                    type : 'value'
	                }
	            ],
	            series : [
	                {
	                    "name":"数目",
	                    "type":"bar",
	                    "data":["${indexEntity['per']}", "${indexEntity['loc']}", "${indexEntity['org']}"]
	                }
	            ]
	        };
	        // 为echarts对象加载数据 
	        myChart.setOption(option); 
	    }
	);
</script>
</head>
<body>
 <center>
 	
 	<div id = "container" >
 		<div id="main" style="width:600px;height:400px;margin: 20px;float: left;"></div>
 		
 		<div style="border:1px solid gray;width: 300px;height: 400px;float: right;margin-right: 20px;margin-top: 50px;">
 			<div id="top">
 			  	<table>
 			  		<tr>
 			  			<td></td><td><a id="" href="<%=request.getContextPath() %>/topic/topicPage?page=1">更多</a></td>
 			  		</tr>
 			  		<c:forEach items="${hoTopics }" var="topic">
 			  			<tr>
	 			  			<td>${topic.topic_id }</td><td>${topic.topic_label }</td>
	 			  		</tr>
 			  		</c:forEach>
 			  	</table>
 			</div>
 		</div>
 	</div>
 </center>
</body>
</html>